package com.hospital.service.project.model.param;


import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hospital.service.project.entity.ProInfoDetails;
import com.hospital.service.project.entity.help.ProInfoDetailsHelp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import enhance.plus.util.MybatisPlusUtil;
import enhance.plus.util.PageHelper;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * 实验项目详细表 新增参数
 *
 * @author xhl
 * @created 2020-10-10 14:59:20
 */
@Data
@ToString
@Accessors(chain = true)
@ApiModel(value="ProInfoDetails[实验项目详细表]分页查询")
public class ProInfoDetailsQueryPageParam extends PageHelper{

    /**
    * ID
    */
    @ApiModelProperty(value = "ID", required = false , example = "")
    private String id;

    /**
     * 项目检索编号
     */
    @ApiModelProperty(value = "项目检索编号", required = false , example = "")
    private String projectNumber;

    /**
     * 实施人编号
     */
    @ApiModelProperty(value = "实施人编号", required = false , example = "")
    private String implementerNumber;

    /**
    * 把非 null 的值 转换成一个 查询条件
    * @return
    */
    public QueryWrapper<ProInfoDetails> convertParamToQueryWapper(){
        QueryWrapper<ProInfoDetails> query = ProInfoDetailsHelp.createQuery();
        Map<String, Object> result =  MybatisPlusUtil.convertParamToMap(this, ProInfoDetails.class);
        query.allEq(result);
        return query;
    }
}
